package beautiful.butterfly.drds.data_exchange;


import beautiful.butterfly.drds.data_exchange.statistics.container.communicator.AbstractContainerCommunicator;
import beautiful.butterfly.drds.data_exchange.util.Configuration;
import org.apache.commons.lang3.Validate;

/**
 * 执行容器的抽象类，持有该容器全局的配置 configuration
 */
public abstract class AbstractContainer
{
    public Configuration configuration;

    public AbstractContainerCommunicator containerCommunicator;

    public AbstractContainer(Configuration configuration)
    {
        Validate.notNull(configuration, "Configuration can not be null.");

        this.configuration = configuration;
    }

    public Configuration getConfiguration()
    {
        return configuration;
    }

    public AbstractContainerCommunicator getContainerCommunicator()
    {
        return containerCommunicator;
    }

    public void setContainerCommunicator(AbstractContainerCommunicator containerCommunicator)
    {
        this.containerCommunicator = containerCommunicator;
    }

    public abstract void start();

}
